package club.janna.springboot.study.domain;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.util.List;

@Data
@Component
@ConfigurationProperties(prefix = "person")
@PropertySource("classpath:person.properties")
public class Person {
    private String name;
    private String sex;
    private Integer age;
    private String[] pets;
    private Friend friend;
    private List<Friend> friends;

    @Data
    public static class Friend {
        private String name;
        private String sex;
    }
}
